#ifndef SERVICE_IMPL_H
#define SERVICE_IMPL_H

#include "service.h"
#include "department.h"
#include "employee.h"
#include <vector>
#include "servicedao_file_impl.h"
using namespace std;

namespace MAN
{
	class ServiceImpl: public Service 
	{
	public:
		vector<Department> m_vecDepts;
		ServiceDao* m_pDao;
		ServiceImpl();

		bool addDept(Department &dept);//增加部门 
		bool deleteDept(int deptid);//删除部门 
		vector<Department>& listDept(void);//列出部门 
		bool addEmp(Employee emp,int depid);//增加员工
		bool deleteEmp(int i,int empid);//删除员工 
		bool modifyEmp(Employee emp,int i);//修改员工信息 
		vector<Employee>& listEmp(int deptid);//列出部门员工 
		vector<Employee>& listAllEmp(void);//列出所有员工

		~ServiceImpl();
		
	};
}

#endif	